<template>
  <web-view :src="url"></web-view>
<!--  <image v-else mode="widthFix" @tap="toPage"
         style="width: 100%; height: 100%;" src="https://minio.gzryzl.com/huatai/2025-01-14/1736853117652173681642772717367731457821736750012061aaaaaa.png" />-->
</template>

<script setup>
import {ref} from "vue";
import {getUserInfoApi} from "@/api/user"
import {onShareAppMessage, onShow} from "@dcloudio/uni-app"

onShareAppMessage(()=>{
  return {
    title: '粽情高新 文明传承',
    path:`/package_games/pages/index`,
    imageUrl: 'https://minio.gzryzl.com/huatai/2025-05-24/1748096591339aaaaaeb49a818bb15066f223796ac6681.png'
  }
})

onShow(() => {
  let token = uni.getStorageSync("token")
  if(token) {
    toPage()
  } else {
    uni.setStorageSync("is_view_activity", '1')
    uni.navigateTo({ url: "/package_login/pages/login/login" })
  }
})

const httpurl = ref("https://www.qingzhuo.vip/ry-activity")

let url = ref(null)
const toPage = () => {
  getUserInfoApi().then((res) => {
    let data = res.data
    url.value = httpurl.value +
        '?uid=' + data.phoneNumber + '&nickname=' + data.nickname + '&avatar=' + data.avatar + '&timeStamp=' + new Date().getTime() + '#/index'
	console.log('url2>' + url.value)
  })
}

</script>

<style scoped lang="less">

</style>
